Finding the needles in the haystack: Generating legal test inputs for object-oriented programs

نویسندگان

  • Shay Artzi
  • Michael D. Ernst
  • Adam Kiezun
  • Carlos Pacheco
  • Jeff H. Perkins
  • Adam Kieżun
چکیده

A test input for an object-oriented program typically consists of a sequence of method calls that use the API defined by the program under test. Generating legal test inputs can be challenging because, for some programs, the set of legal method sequences is much smaller than the set of all possible sequences; without a formal specification of legal sequences, an input generator is bound to produce mostly illegal sequences. We propose a scalable technique that combines dynamic analysis with random testing to help an input generator create legal test inputs without a formal specification, even for programs in which most sequences are illegal. The technique uses an example execution of the program to infer a model of legal call sequences, and uses the model to guide a random input generator towards legal but behaviorally-diverse sequences. We have implemented our technique for Java, in a tool called Palulu, and evaluated its effectiveness in creating legal inputs for real programs. Our experimental results indicate that the technique is effective and scalable. Our preliminary evaluation indicates that the technique can quickly generate legal sequences for complex inputs: in a case study, Palulu created legal test inputs in seconds for a set of complex classes, for which it took an expert thirty minutes to generate a single legal input.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Declarative Semantics in Object-Oriented Software Development - A Taxonomy and Survey

One of the modern paradigms to develop an application is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles in applications. In an application, we must distinguish between procedural semantics and declarative semantics for their implementation in a specific programming language. For the procedural semantics, we can write a ...

متن کامل

Objects Identification in Object-Oriented Software Development - A Taxonomy and Survey on Techniques

Analysis and design of object oriented is onemodern paradigms for developing a system. In this paradigm, there are several objects and each object plays some specific roles. Identifying objects (and classes) is one of the most important steps in the object-oriented paradigm. This paper makes a literature review over techniques to identify objects and then presents six taxonomies for them. The f...

متن کامل

The Needles-in-Haystack Problem

We consider a new data mining problem of detecting the members of a rare class of data, the needles, that have been hidden in a set of records, the haystack. Besides the haystack, a single instance of a needle is given. It is assumed that members of the needle class are similar according to an unknown needle characterization. The goal is to find the needle records hidden in the haystack. This p...

متن کامل

Generating Test Cases for Overloaded Object-Oriented Programs using EGS (Extended General State-charts)

Overloading and polymorphism are two important aspects in object-oriented programming languages. When an class has either of these two specialities and is depicted with a state-chart which characterizes the behaviour of the class, problems arise. Such as different transition arcs are labelled with the same name but may represent similar duties on that state-chart. General state-charts (GS) can ...

متن کامل

Process rather than pattern: finding pine needles in the coevolutionary haystack

The geographic mosaic theory is fast becoming a unifying framework for coevolutionary studies. A recent experimental study of interactions between pines and mycorrhizal fungi in BMC Biology is the first to rigorously test geographical selection mosaics, one of the cornerstones of the theory.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006